The present invention relates to a cubic equation calculation apparatus for calculating the value f(T) of a function T that is defined by f(T)=AT.sup.3 +BT.sup.2 +CT+D where A, B, C and D are constants, and a coordinate data generation apparatus that uses this calculation apparatus to generate coordinates on cubic curves.
These apparatus are applicable to computer graphics or desktop publishing (DTP) and the like, and substitute parameters for the cubic equation to calculate coordinate on the display screen, and perform the screen display of smooth curves.
A cubic equation curve is defined by four representative points and in the case of two dimensions, can be generally expressed by EQU x=B.sub.1 (t)x.sub.1 +B.sub.2 (t)x.sub.2 +B.sub.3 (t)x.sub.3 +B.sub.4 (t)x.sub.4 ( 1a) EQU y=B.sub.1 (t)y.sub.1 +B.sub.2 (t)y.sub.2 +B.sub.3 (t)y.sub.3 +B.sub.4 (t)y.sub.4 ( 1b)
In the case of three dimensions, the above formula have the factor EQU z=B.sub.1 (t)z.sub.1 +B.sub.2 (t)z.sub.2 +B.sub.3 (t)z.sub.3 +B.sub.4 (t)z.sub.4
added.
For the sake of simplicity, the following description will be for the case of two dimensions.
The four points of (x.sub.1, y.sub.1), (x.sub.2, y.sub.2), (x.sub.3, y.sub.3) and (x.sub.4, y.sub.4) are the four representative points and B.sub.1 (t), B.sub.2 (t), B.sub.3 (t) and B.sub.4 (t) are the cubic equations for "t". The type of cubic curve that is obtained is determined by the cubic equations that are used for terms B.sub.1 (t), B.sub.2 (t), B.sub.3 (t) and B.sub.4 (t) in formula (1a) and (1b). For example, in the case of a Bezier curve, the cubic equations are EQU B.sub.1 (t)=(1-t).sup.3 EQU B.sub.2 (t)=3t(1-t).sup.2 EQU B.sub.3 (t)=3t.sup.2 (1-t) EQU B.sub.4 (t)=t.sup.3
These cubic equations are generally expressed as follows. EQU B.sub.1 (t)=at.sup.3 +bt.sup.2 +ct+d (2-1) EQU B.sub.2 (t)=et.sup.3 +ft.sup.2 +gt+h (2-2) EQU B.sub.3 (t)=it.sup.3 +jt.sup.2 +kt+1 (2-3) EQU B.sub.4 (t)=mt.sup.3 +nt.sup.2 +ot+p (2-4)
The parameter "t" in these formula gradually increments from 0 to 1 to determine the curve. The amount of the increment is determined so that the printed or displayed output does not have missing pixels. If the amount of this increment is made ##EQU1## then the value of "t" successively changes through 0, ##EQU2## and so on so that the formula (2-1) through (2-4) can be used to determine B.sub.1 (t), B.sub.2 (t), B.sub.3 (t) and B.sub.4 (t) and the values for these input to formula (1a) and (1b) to determine the values for x and y.
The following is a description of the method for the calculating B.sub.1 (t), B.sub.2 (t), B.sub.3 (t) and B.sub.4 (t).
B.sub.1 (t), B.sub.2 (t), B.sub.3 (t) and B.sub.4 (t) are all formula having the same format and so they can be calculated by the same method. Accordingly, only a description of the method of calculating B.sub.1 (t) will be given below.
When T is defined as T=.alpha.t, formula (2-1) becomes ##EQU3##
If ##EQU4## then the new cubic equation B.sub.1 (T) becomes as follows. EQU B.sub.1 (T)=AT.sup.3 +BT.sup.2 +CT+D (3)
where, T=0, 1, 2, .alpha.
When the cubic equation calculation indicated by formula (3) is performed, the conventional method has been to determine T.sup.2 by the product of T.times.T and to determine T.sup.3 by the product of T.sup.2 .times.T and to use the values to determine C.times.T, B.times.T.sup.2 and A.times.T.sup.3. The addition of D to the results of these multiplications enables the above function f(T) to be calculated.
This conventional method involves five multiplications and three additions. When these multiplications and additions are performed sequentially, the multiplications take about ten times more time than the additions and if the time required for the additions is h, then the total time required for the calculations is about 54h. Therefore, high-speed processing is not possible if there are many multiplication calculations
FIG. 1 indicates a parallel processing circuit for the parallel processing of these calculations so that high-speed processing can be achieved. The calculation circuit indicated in FIG. 1 has five parallel multipliers 61 through 65 and three adders 66 through 68. The parallel multiplier 61 calculates T.times.T, the parallel multiplier 62 calculates T.sup.2 .times.T, and parallel multiplier 63 calculates T.sup.3 .times.A. In addition, parallel multiplier 64 calculates T.sup.2 .times.B and parallel multiplier 65 calculates T.times.C. Moreover, adder 66 adds AT.sup.3 from parallel multiplier 63 to BT.sup.2 from parallel multiplier 64 to calculate the product AT.sup.3 +BT.sup.2 and adder 67 adds the results AT.sup.3 +BT.sup.2 of this addition and CT from parallel multiplier 65 to calculate the product AT.sup.3 +BT.sup.2 +CT. Then, adder 68 adds D to the AT.sup.3 +BT.sup.2 +CT from adder 67 to calculate AT.sup.3 +BT.sup.3 +CT+D. The value calculated by adder 68 then becomes the final result B.sub.1 (T)=AT.sup.3 +BT.sup.2 +CT+D.
In the calculation circuit described above, the parallel multipliers require approximately five or six times the amount of hardware of the adders and so if the amount of hardware of the adders is l, then the total amount of hardware is 28l to 33l. Accordingly, the amount of hardware becomes larger if the amount of parallel processing becomes larger.